﻿<%@ Page Language="C#" MasterPageFile="~/WebSite.Master" AutoEventWireup="true" CodeBehind="CAInvoiceList.aspx.cs"
    Inherits="RN.ERP.Web.CA.CAInvoiceList" %>

<%@ Register Src="../UserControl/UCArea.ascx" TagName="UCArea" TagPrefix="ucArea" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript" src="../Scripts/ligerUI/js/ligerui.min.js"></script>
    <script type="text/javascript">
        function ShowViewForm(url) {
            $.ligerDialog.open({ url: url, width: 900, height: 600, title: '发票信息', buttons: [{ text: '关闭', onclick: function (item, dialog) { dialog.close(); } }] });
            return false;
        }

        function CloseWin(data) {
            if (data == "1") {
                $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("RebindAndNavigate");
            }
        }
    </script>
    <style type="text/css">
        .text_css
        {
            border: 2px;
            height: 24px;
            line-height: 24px;
            margin-top: 8px;
        }
        .lbCss
        {
            color: blue;
        }
        .lbCss2
        {
            color: Red;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
        <%--<tr>
            <td colspan="4" height="30" class="position">
                您所在的位置：<a href="#">首页</a>&gt;&gt;<span class="blue">财务确认</span>
            </td>
        </tr>--%>
        <tr>
            <td width="19" class="xx_m">
                <img src="../Images/xx_l.jpg" width="19" height="33" />
            </td>
            <td width="24" class="xx_m  tt_xx_icon">
                &nbsp;
            </td>
            <td width="1250" class="xx_m">
                订单列表
            </td>
            <td width="14">
                <img src="../Images/xx_r.jpg" width="14" height="33" />
            </td>
        </tr>
        <tr>
            <td class="left_con">
                &nbsp;
            </td>
            <td colspan="2" style="padding-left: 6px; padding-right: 6px;" valign="top">
                <!--#订单列表-->
                <div>
                    <div class="xian">
                        <div class="about_title">
                            订单列表</div>
                        <div class="i-con-cn">
                        </div>
                    </div>
                    <table style="width: 100%; padding-bottom: 10px; background-color: #eaeaea;">
                        <tr style="height: 50px;">
                            <td width="7%" style="padding-left: 10px;">
                                企业名称：
                            </td>
                            <td style="text-align: left" width="15%">
                                <asp:TextBox ID="txtCorpName" runat="server" CssClass="text_css">
                                </asp:TextBox>
                            </td>
                            <td width="7%">
                                证书名称：
                            </td>
                            <td style="text-align: left" width="15%">
                                <asp:TextBox ID="txtCertName" runat="server" CssClass="text_css">
                                </asp:TextBox>
                            </td>
                            <td width="7%">
                                发票状态：
                            </td>
                            <td style="text-align: left;" width="10%">
                                <asp:DropDownList ID="ddlStatus" runat="server" Height="25" Width="90">
                                    <asp:ListItem Value="-1">--全部--</asp:ListItem>
                                    <asp:ListItem Value="0">索要发票</asp:ListItem>
                                    <asp:ListItem Value="1">已开发票</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                            <td rowspan="2" style="padding-right: 10px;">
                                <span class="xtbiao">
                                    <asp:LinkButton ID="lbExport" runat="server" Text="导出表格" OnClick="lbExport_Click">
                                    </asp:LinkButton></span> <span class="xtbiao">
                                        <asp:LinkButton ID="lbSearch" runat="server" Text="查询" OnClick="lbSearch_Click">
                                        </asp:LinkButton></span>
                            </td>
                        </tr>
                        <tr style="height: 50px;">
                            <td width="7%" style="padding-left: 10px;">
                                索要日期：
                            </td>
                            <td style="text-align: left" width="15%">
                                <asp:TextBox ID="txtBegin" runat="server" CssClass="text_css" onclick="WdatePicker({skin:'blue'})">
                                </asp:TextBox>
                            </td>
                            <td width="7%">
                                开票日期：
                            </td>
                            <td style="text-align: left" width="15%">
                                <asp:TextBox ID="txtEnd" runat="server" CssClass="text_css" onclick="WdatePicker({skin:'blue'})">
                                </asp:TextBox>
                            </td>
                            <td width="8%">
                                企业所在地：
                            </td>
                            <td style="text-align: left; padding-bottom: 8px;" width="15%">
                                <ucArea:UCArea ID="ucArea" Name="ucArea" runat="server" />
                            </td>
                        </tr>
                    </table>
                    <br />
                    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
                        <AjaxSettings>
                            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                                <UpdatedControls>
                                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="gridLoadingPanel">
                                    </telerik:AjaxUpdatedControl>
                                </UpdatedControls>
                            </telerik:AjaxSetting>
                            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                                <UpdatedControls>
                                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="gridLoadingPanel">
                                    </telerik:AjaxUpdatedControl>
                                </UpdatedControls>
                            </telerik:AjaxSetting>
                        </AjaxSettings>
                    </telerik:RadAjaxManager>
                    <telerik:RadGrid ID="RadGrid1" runat="server" ShowStatusBar="True" AllowSorting="false"
                        PageSize="20" Culture="zh-CN" AllowPaging="true" OnItemDataBound="RadGrid1_temDataBound"
                        OnNeedDataSource="RadGrid1_NeedDataSource">
                        <MasterTableView AutoGenerateColumns="false" DataKeyNames="ID" NoMasterRecordsText="暂无数据"
                            CommandItemDisplay="Top">
                            <CommandItemSettings ExportToPdfText="Export to PDF" />
                            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="true">
                            </RowIndicatorColumn>
                            <EditFormSettings>
                                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                                </EditColumn>
                            </EditFormSettings>
                            <PagerStyle AlwaysVisible="True" />
                            <CommandItemTemplate>
                            </CommandItemTemplate>
                            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True">
                            </ExpandCollapseColumn>
                            <Columns>
                                <telerik:GridBoundColumn HeaderText="企业名称" UniqueName="CorpName" HeaderStyle-Width="10%"
                                    HeaderStyle-HorizontalAlign="Center" DataField="CorpName" ItemStyle-HorizontalAlign="Center">
                                </telerik:GridBoundColumn>
                                <telerik:GridTemplateColumn HeaderText="发票抬头" UniqueName="iTitle" HeaderStyle-Width="9%"
                                    HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <%--<%#Container.DataSetIndex+1%>--%>
                                        <asp:Label ID="lbiTitle" runat="server" Text='<%#Eval("iTitle") %>'></asp:Label>
                                        <asp:Label ID="lbId" runat="server" Text='<%#Eval("ID") %>' Visible="false"></asp:Label>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridBoundColumn DataField="Code" HeaderText="订单编号" UniqueName="Code" HeaderStyle-Width="7%"
                                    HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="LinkPerson" HeaderText="联系人" UniqueName="LinkPerson"
                                    HeaderStyle-Width="6%" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="officeTel" HeaderText="联系电话" UniqueName="officeTel"
                                    HeaderStyle-Width="8%" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="SendAddress" HeaderText="寄送地址" UniqueName="SendAddress"
                                    HeaderStyle-Width="9%" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="GroupName" HeaderText="订单类型" UniqueName="GroupName"
                                    HeaderStyle-Width="8%" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn HeaderText="证书名称" UniqueName="Title" HeaderStyle-Width="10%"
                                    HeaderStyle-HorizontalAlign="Center" DataField="Title" ItemStyle-HorizontalAlign="Center">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="bCAKind" HeaderText="产品类型" UniqueName="bCAKind"
                                    HeaderStyle-Width="10%" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="SumPay" HeaderText="购买金额<br/>(单位：元)" UniqueName="SumPay"
                                    HeaderStyle-Width="7%" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                                </telerik:GridBoundColumn>
                                <telerik:GridTemplateColumn HeaderText="合计金额<br/>(单位：元)" UniqueName="InvoiceSumPay"
                                    HeaderStyle-Width="8%" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <a style="cursor: pointer;" onclick='return ShowViewForm("CAInvoiceInfo.aspx?t=1&o=<%# Eval("InvoiceGUID") %>");'>
                                            <%#Eval("InvoiceSumPay")%></a>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn HeaderText="操作" UniqueName="InvoiceCode" HeaderStyle-HorizontalAlign="Center"
                                    ItemStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <asp:HiddenField ID="hdnInvoice" runat="server" Value='<%# Eval("InvoiceGUID") %>' />
                                        <asp:HiddenField ID="hidStatus" runat="server" Value='<%# Eval("InvoiceStatus") %>' />
                                        <asp:Label ID="lbOpt1" CssClass="lbCss" runat="server" Text="已开发票" Visible="false"></asp:Label>
                                        <a style="cursor: pointer; color: red;" onclick='<%# GetInvoiceUrl(Eval("InvoiceGUID")) %>'>
                                            <asp:Label ID="lbOpt" CssClass="lbCss2" runat="server" Text="开发票" Visible="false"></asp:Label></a>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                            </Columns>
                        </MasterTableView>
                        <ClientSettings EnableRowHoverStyle="true">
                            <Selecting AllowRowSelect="True"></Selecting>
                        </ClientSettings>
                        <FilterMenu EnableImageSprites="False">
                        </FilterMenu>
                    </telerik:RadGrid>
                </div>
                <!--#订单列表结束-->
            </td>
            <td class="right_con">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td class="con_m">
                <img src="../Images/left_bottom.jpg" width="19" height="24" alt="" />
            </td>
            <td colspan="2" class="con_m">
                &nbsp;
            </td>
            <td>
                <img src="../Images/right_bottom.jpg" width="14" height="24" alt="" />
            </td>
        </tr>
    </table>
    <div id="UDialog" style="margin: auto; width: 900px;">
        <telerik:RadAjaxLoadingPanel runat="server" ID="gridLoadingPanel">
        </telerik:RadAjaxLoadingPanel>
        <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true">
            <Windows>
                <telerik:RadWindow ID="UserDialog" runat="server" Title="订单信息" Height="600px" Behaviors="Close"
                    Width="900px" Left="150px" ReloadOnShow="true" ShowContentDuringLoad="false"
                    Modal="true" Skin="WebBlue" VisibleStatusbar="False">
                </telerik:RadWindow>
            </Windows>
        </telerik:RadWindowManager>
    </div>
    <asp:HiddenField ID="hidCorpName" runat="server" />
</asp:Content>
